---
title: Establish data layer
summary: Establishes the Oracle data portal for the claim domain during application manager initialization.
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Application.Claim
reference_type: embedded
operation_id: OP-CLM-006
trigger: Invoked once during application manager initialization (inherited lifecycle from SAIF.Application).
---

# Establish data layer

Protected override on `ClaimAppManager` (`OnCreateDataLayer`) that establishes the Oracle data portal for the claim domain.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-CLM-006 |
| **Trigger** | Invoked once during application manager initialization (inherited lifecycle, not re-documented here). |
| **Inputs** | None |
| **Outputs** | Configured `DataLayer` DPI, or a thrown exception |
| **Primary components** | `ClaimAppManager.OnCreateDataLayer` |
| **Entry point** | `SAIF.Application.Claim\ClaimAppManager.vb` |

## Steps

1. Call `DataLayer.CreateOraclePortal(ClaimAppConstants.DPIClaimKey)` to establish the Oracle data portal keyed as `"ClaimDPI"`.
2. On any exception, call `MarkContextNotSet()` and `MarkNoAccess()`, then throw a new `ApplicationException("Unable to Establish Database Connection", ex)` wrapping the original error.
   - This is a connectivity-failure fail-closed behavior rather than an AD-resource check.

## Process flow

```mermaid
flowchart TD
	Start([OnCreateDataLayer invoked]) --> Create[DataLayer.CreateOraclePortal ClaimDPI]
	Create --> Exception{Exception?}
	Exception -->|No| Success([DPI established])
	Exception -->|Yes| FailClosed[MarkContextNotSet + MarkNoAccess]
	FailClosed --> Throw([Throw ApplicationException])
```

## Failure and edge-case behavior

- Oracle portal creation failure: context marked not set, access marked denied, wrapped `ApplicationException` re-thrown.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

## Sources
- `SAIF.Application.Claim\ClaimAppManager.vb`
- `SAIF.Application.Claim\ClaimAppConstants.vb`
